call setpath.bat
set IOTYPE=uart
rem set IOTYPE=keyScreen

set HAVE_MATH=-DHAVE_MATH=1

set HARD_MATH=-DHARD_MATH=1

if "%IOTYPE%"=="keyScreen" set KEYSCREEN=-DKEYSCREEN=1

"nios2-elf-gcc" -S -Os inc/system.c -o system.s
"nios2-elf-gcc" -S -Os inc/uart.c -o uart.s
"nios2-elf-gcc" -S -Os inc/keyScreen.c -o keyScreen.s
"nios2-elf-gcc" -S -Os %HAVE_MATH% %KEYSCREEN% inc/print.c -o print.s
"nios2-elf-gcc" -Os -S inc/math.c -o math.s
"nios2-elf-gcc" -Os -S %HARD_MATH% math-test.cpp -o math-test.s
compile math-test.s,system.s,%IOTYPE%.s,print.s,math.s,inc\irq.asm math-test.temp.s dos out.bin
pause


rem -mhw-div 



rem #define HARD_MUL
rem #define HARD_SFDIV
rem #define HARD_FDIV
rem #define HARD_SFMUL
rem #define HARD_FMUL
rem //?#define HARD_DIV
